package com.douyinkan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("content_tags")
public class ContentTag {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("content_id")
    private Long contentId; // 存储content的ID而不是对象

    @TableField("tag_id")
    private Long tagId; // 存储tag的ID而不是对象

    // 构造函数
    public ContentTag() {}

    public ContentTag(Long contentId, Long tagId) {
        this.contentId = contentId;
        this.tagId = tagId;
    }

    // Getter和Setter方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getContentId() {
        return contentId;
    }

    public void setContentId(Long contentId) {
        this.contentId = contentId;
    }

    public Long getTagId() {
        return tagId;
    }

    public void setTagId(Long tagId) {
        this.tagId = tagId;
    }
}